﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Atendimento.Master" AutoEventWireup="true" Theme="Adm" CodeBehind="RelatorioAtmMedia.aspx.cs" Inherits="PROAD.admin.Relatorio.RelatorioAtmMedia" %>
<%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit"  Assembly="AjaxControlToolkit"%>
<asp:Content ID="Content1" ContentPlaceHolderID="IncludeHead" runat="server">
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="IncludeTitulo" runat="server">
<h1>Relatório de Atendimentos</h1>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="IncludeCaminho" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="IncludeConteudo" runat="server">
<asp:Panel ID="PnlConsulta" runat="server">

<table width="100%" cellpadding="2" cellspacing="2" border="0">
                      <tr>
                           <td colspan="2">UF</td>
                            
                      </tr>
                      <tr>
                           <td colspan="2">
                                <asp:DropDownList ID="ddlUf" runat="server" DataTextField="NO_SIGLA" 
                                    DataValueField="CO_UF" >
                                </asp:DropDownList>
                           </td>
                          
                      </tr>
                      <tr>
                        <td>Data Inicial</td>
                        <td>Data Final</td>
                      </tr>
                       <tr>
                        <td><asp:TextBox ID="txtDtInicial" runat="server"></asp:TextBox>
                              <asp:CalendarExtender  Enabled="True" ID="txtDtInicial_CalendarExtender" runat="server" TargetControlID="txtDtInicial" PopupButtonID="imgCalendar" Format="dd/MM/yyyy">
                            </asp:CalendarExtender>
                            <asp:ImageButton ID="imgCalendar" runat="server" ImageUrl="~/common/imagem_sis/imagem_sis/calendario.png" />
                            </td>
                             
                            <td><asp:TextBox ID="txtDtFinal" runat="server"></asp:TextBox>
                            <asp:CalendarExtender  Enabled="True" ID="txtDtFinal_CalendarExtender" runat="server" TargetControlID="txtDtFinal" PopupButtonID="imgCalendar1" Format="dd/MM/yyyy">
                            </asp:CalendarExtender>
                            <asp:ImageButton ID="imgCalendar1" runat="server" ImageUrl="~/common/imagem_sis/imagem_sis/calendario.png" />
                            </td>
                      </tr>
                      <tr>
                        <td colspan="2">
                            <asp:Button ID="btnPesquisar" runat="server" Text="Pesquisar" 
                                onclick="btnPesquisar_Click" />                
                        </td>
                      </tr>
                </table>
        </asp:Panel>
        <asp:Panel ID="pnlResult" runat="server" Visible="false">
   <table border="0" cellpadding="1" cellspacing="1" width="98%">
          <tr>
                        <td colspan="3">
                            <center>
                                <asp:Button ID="btnNovaPesquisa" runat="server" Text="Nova Pesquisa" onclick="btnNovaPesquisa_Click" 
                                 /> 
                            </center>
                        </td>
                    </tr>
        <tr class="tr">
            <td>
                <asp:GridView ID="gdrAtmEq" runat="server" AutoGenerateColumns="false" 
                    SkinID="GridAdm" Width="98%" onrowdatabound="gdrAtmEq_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="TOTAL_ATENDIMENTO" HeaderText="Total de Atendimentos" HeaderStyle-HorizontalAlign="Left"/>
                        <asp:BoundField DataField="N_EQUIPES_TOTAL" HeaderText="Total de Equipes" HeaderStyle-HorizontalAlign="Left" />
                        <asp:TemplateField HeaderText="Média de Atendimento Por Equipe" HeaderStyle-HorizontalAlign="Left">
                            <ItemTemplate>
                                <asp:Label ID="lblTotal" runat="server" ></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
            
           
        </tr>
        
        <tr>
            <td>&nbsp;</td>           
        </tr>
        <tr class="tr">
            <td> <asp:GridView ID="grdAtmAb" runat="server" AutoGenerateColumns="false" 
                    SkinID="GridAdm" Width="98%" onrowdatabound="grdAtmAb_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="TOTAL_ATENDIMENTO" HeaderText="Total de Atendimentos" HeaderStyle-HorizontalAlign="Left" />
                        <asp:BoundField DataField="N_EQUIPES_AB" HeaderText="Total de Equipes em AB" HeaderStyle-HorizontalAlign="Left"  />
                        <asp:TemplateField HeaderText="Média de Atendimentos Por Equipes AB" HeaderStyle-HorizontalAlign="Left" >
                            <ItemTemplate>
                                <asp:Label ID="lblTotal1" runat="server" ></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView></td>
            
        </tr>
        

        <tr>
            <td colspan="3">&nbsp;</td>           
        </tr>
        <tr>
            <td> <asp:GridView ID="grdAtmMac" runat="server" AutoGenerateColumns="false" 
                    SkinID="GridAdm" Width="98%" onrowdatabound="grdAtmMac_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="TOTAL_ATENDIMENTO" HeaderText="Total de Atendimentos" HeaderStyle-HorizontalAlign="Left"/>
                        <asp:BoundField DataField="N_EQUIPES_MAC" HeaderText="Total de Equipes MAC" HeaderStyle-HorizontalAlign="Left" />
                        <asp:TemplateField HeaderText="Média de Atendimentos Por Equipes MAC" HeaderStyle-HorizontalAlign="Left">
                            <ItemTemplate>
                                <asp:Label ID="lblTotal2" runat="server" ></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView></td>
            
        </tr>
       
        <tr>
            <td colspan="3">&nbsp;</td>           
        </tr>
        
    </table>
    </asp:Panel>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="IncludeRodape" runat="server">
</asp:Content>
